Skip to content

Achievements /achievements page - #45

Draft
mirzattar wants to merge 5 commits into
mainfrom
achievements
Draft

mirzattar wants to merge 5 commits into
mainfrom
achievements

Conversation

@mirzattar

Copy link
Copy Markdown
Member

Closes #33

@mirzattar
mirzattar requested a review from outrowed November 11, 2026 02:12
@mirzattar mirzattar added the enhancement New feature or request label Nov 11, 2026
Comment on lines +2 to +3
import type { LatestAchievement } from "@/data/achievements";
import styles from "./LatestAchievements.module.css";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
import type { LatestAchievement } from "@/data/achievements";
import styles from "./LatestAchievements.module.css";
import type { LatestAchievement } from "@/data/achievements";

achievements: LatestAchievement[];
}

const { achievements } = Astro.props;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedVariables> reported by reviewdog 🐶
This variable achievements is unused.

Comment on lines +2 to +3
import type { YearGroup } from "@/data/achievements";
import styles from "./YearlyAchievements.module.css";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
import type { YearGroup } from "@/data/achievements";
import styles from "./YearlyAchievements.module.css";
import type { YearGroup } from "@/data/achievements";

yearGroups: YearGroup[];
}

const { yearGroups } = Astro.props;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedVariables> reported by reviewdog 🐶
This variable yearGroups is unused.

Comment on lines 5 to +9
import { RootRoutes } from "@/routes";
import {
latestAchievements,
yearlyAchievementsByYear,
} from "@/data/achievements";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
import { RootRoutes } from "@/routes";
import {
latestAchievements,
yearlyAchievementsByYear,
} from "@/data/achievements";
import { RootRoutes } from "@/routes";

Comment on lines +9 to +10
} from "@/data/achievements";
import LatestAchievements from "@/components/Achievements/LatestAchievements.astro";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
} from "@/data/achievements";
import LatestAchievements from "@/components/Achievements/LatestAchievements.astro";
} from "@/data/achievements";

Comment on lines +10 to +11
import LatestAchievements from "@/components/Achievements/LatestAchievements.astro";
import YearlyAchievements from "@/components/Achievements/YearlyAchievements.astro";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
import LatestAchievements from "@/components/Achievements/LatestAchievements.astro";
import YearlyAchievements from "@/components/Achievements/YearlyAchievements.astro";
import LatestAchievements from "@/components/Achievements/LatestAchievements.astro";

Comment on lines +11 to +12
import YearlyAchievements from "@/components/Achievements/YearlyAchievements.astro";
import styles from "./index.module.css";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [Biome] <lint/correctness/noUnusedImports> reported by reviewdog 🐶
This import is unused.

Suggested change
import YearlyAchievements from "@/components/Achievements/YearlyAchievements.astro";
import styles from "./index.module.css";
import YearlyAchievements from "@/components/Achievements/YearlyAchievements.astro";

@outrowed

Copy link
Copy Markdown
Member
image

Baru ngecek kodenya, tpi pas lagi preview keliatan judul halamannya ketutup dengan header navbar 😌

Gpp si mungkin saya bisa sekalian ngefix sambil review codenya nanti

@outrowed outrowed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ada beberapa isu2 kode dalam branch ini. Saya berencana akan ngefix kode ini nanti biar bisa dimerge.

</section>

<!-- Data for dynamic client switching -->
<script define:vars={{ achievementsData: achievements }}>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<script> itu berarti browser menjalankan kode JavaScript ini, bukan dari servernya. Karena Astro itu primarily server-sided, kita diencourge banget untuk menjalankan semua kode dalam server. Kode2 yng dijalankan dalam client itu sangat jarang, dan khususnya bagus buat ngeload data dynamic, seperti members page yng membuat list dynamic dengan datanya dari server.

Menurut saya since semua data achievements itu available dalam server dan page juga tidak memakai dynamic data sama sekali, kita tidak perlu pake <script> buat ngeload dynamic script di client browsernya sendiri. Cukup semua kode bisa masuk ke dalam Astro file (tidak pake client sided <script> tag in general)

Comment on lines +27 to +28
background: var(--glass-bg, rgba(14, 18, 30, 0.75));
border: var(--glass-border, 1px solid rgba(255, 255, 255, 0.15));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--glass-bg and --glass-border don't exist, jadi ini kodenya benar2 pake value fallback dari si var()

Comment on lines +129 to +131
memberListEl.innerHTML = activeData.members
.map((m) => `<li style="font-size: clamp(0.88rem, 1.2vw, 0.98rem); line-height: 1.6; color: rgba(255, 255, 255, 0.9);">${m}</li>`)
.join("");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jangan pake .innerHTML sama sekali karena dangerous banget dan dapat muncul XSS kalo misalnya menginput data-data dari user. Keliatannya disini kita memakai data members yang sumbernya dari kita (dari mapping ${m} dibawah), seharusnya aman, tetapi kalau misalnya data members contain suatu kode markup HTML, browser dapat ngeexecute HTML itu dari innerHTML, dan dapat ngeload script via <script> tag

Menurut saya kita seharusnya kita buat HTML element sendiri via document.createElement, or like previously mentioned, memakai kode Astro dan menghindari pengunaan <script> tag disini

Comment thread src/pages/achievements/index.module.css Outdated
max-width: 1100px;
margin-inline: auto;
padding-inline: clamp(1.25rem, 4.5vw, 3rem);
padding-block-start: clamp(3rem, 5.5vh, 4.5rem);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nilai padding terlalu complex dan kurang cukup sehingga tertutup oleh navbar header. Seharusnya pake padding-block-start: 120px seperti di src/pages/members/index.module.css

Comment thread src/data/achievements.ts
],
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
showOverlay: false, // ioai-winner.png already incorporates the Figma artwork typography

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Item pertama tidak display teks sama sekali dari website karena dalam gambar sudah ada teks:

image

Sehingga yng lain ada teksnya dari website:

image

Ini keliatan tidak konsisten, seharusnya teks hanya khusus diinsert dari website sendiri bukan dari gambarnya.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ada file gambar duplikat sini.

Keliatannya tidak kepake sama sekali dalam codebase. Justru file gambar yng dipake oleh latest achievements dan src/data/achievements.ts itu adalah public/images/achievements bukan ini.

Seharusnya filenya di delete biar tidak membingungkan.

The achievements page used viewport-relative clamps for its outer padding
(clamp(3rem, 5.5vh, 4.5rem) block-start), which resolved to 48-72px and left
the page heading underneath the fixed site header. The header ends at 123px
on desktop, so "LATEST ACHIEVEMENTS" rendered behind the navigation bar.

Adopt the members page convention instead: fixed 120px block padding with
padding-inline: max(2rem, 5vw). The mobile override that reduced block-start
to 2.25rem is removed, since members has no equivalent reduction and it
reintroduced the collision below 768px.

Verified padding-block-start computes to 120px and the heading top edge
matches members at both 1280x720 and 390x664.
The carousel bar laid the nav buttons out with flex space-between while the
card was absolutely positioned and centered, so the arrows drew on top of the
image. At 390px each arrow intruded 27.3px into the card, and the mobile
width: 68% override was compensating for it with a magic number.

Lay the bar out as a three-column grid (auto, growing card cell, auto) and let
the card be a normal centered grid child with a max-width instead of an
absolutely positioned box. Overlap is now impossible by construction rather
than tuned away. Tighten the bar padding and arrow size under 768px so the
reclaimed space goes to the image: the card grows from 174px to 212px at
390px, and from 155px to 182px at 360px, with positive clearance on both
sides at every width.

Also drop styles.prev_btn and styles.next_btn from the buttons. Neither class
was ever defined, so the build emitted class="nav_button undefined".

Scale both section headings with min(8.5vw, 3.25rem) below 768px. The root
font size is 24px, so clamp(2rem, 4.5vw, 3.25rem) bottomed out at 48px and
"ACHIEVEMENTS" needed 376.8px inside a 294px column, running 34.8px past a
390px viewport where overflow-x: hidden clipped it silently.

Verified at 320, 360, 390, 430, and 1280px: no horizontal overflow and zero
heading overflow, card keeps its full 440px max-width on desktop, and
prev/next still advance and wrap correctly.
…ontrast

The achievements stylesheets hardcoded twelve six-digit hex values while the
rest of the site routes color through the palette in colors.css. They also
referenced --glass-bg and --glass-border with fallbacks, but neither token was
ever defined, so the fallbacks silently won and the var() indirection was dead
code.

Define the reusable values in colors.css (--accent-gold-deep, --fg-icon-muted,
--bg-page-deep, --bg-frame, --bg-card-light) and keep the glass tokens page
local by declaring them on .achievements_page in the page's CSS module. Declaring
them on :root inside a module would still emit a global rule, so the wrapper is
what actually scopes them; the carousel inherits them as a descendant. Glass
values now mirror Members/Surface: rgba(0,0,0,0.44) background, a
rgba(255,255,255,0.18) border, and blur(var(--blur-radius)).

Dropping the hand-written -webkit-backdrop-filter exposed that the carousel blur
had never applied: Lightning CSS collapsed the paired declarations to the
prefixed form only, leaving no unprefixed backdrop-filter for Chrome. Removing
the manual prefix lets the build emit backdrop-filter and the blur resolves to
blur(7.35px) instead of none.

The yearly card medal icons were near-invisible at 1.23:1 on their white tiles,
and the hover accent was 2.15:1, below the 3:1 floor for graphical objects. Use
#64748b for the resting icon and #b45309 on hover, both verified from computed
styles at 4.76:1 and 5.02:1.

Verified at 1280x720 and 390px: no horizontal overflow, carousel arrows keep
positive clearance, page-scoped tokens do not leak to :root, and the build
passes at 557 pages with a clean astro check.
The carousel rebuilt the member list by interpolating names into an HTML
string and assigning it to innerHTML. Two problems followed from that. Any
member name containing markup would be parsed as HTML, and the list items
carried inline styles that duplicated the .member_item rule, so the class the
server renders was discarded the first time a slide changed.

Build the items with createElement and textContent instead, and take the class
from the CSS module so the styled path and the scripted path share one source
of truth. The inline style is gone.

Rendered output is unchanged: computed font-size, line-height, and color match
the previous values exactly. The difference is that items now keep their
.member_item class after navigation instead of falling back to inline styles,
and the payload is treated as text rather than parsed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Achievements /achievements page

3 participants